<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>布尔值关灯</title>
</head>
<body>
    <img id="d" src="./上机练习2img/pic_bulbon.gif" alt="">
</body>
<script>
var deng = true;
if(deng==true){
    let img = document.getElementById("d");
    img.src = "./上机练习2img/pic_bulboff.gif";
}
</script>
</html>